<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ page import="org.dizem.groupon.service.CityService" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
	<meta http-equiv=content-type content="text/html; charset=UTF-8"/>
	<title>注册</title>
	<link rel="stylesheet" href="/css/index.css" type="text/css" media="screen" charset="utf-8"/>
	<script type="text/javascript" src="/js/jquery-1.6.js"></script>
</head>
<body>
<jsp:include page="../common/header.jsp"/>
<div id="dialog"></div>

<div id="bdw" class="bdw">
	<div id="bd" class="cf">
		<div id="signup">
			<div id="content" class="signup-box">
				<div class="box">
					<div class="box-top"></div>
					<div class="box-content">
						<div class="head"><h2 href="/page/register.jsp">注册</h2><span>&nbsp;或者 <a
								href="/page/login.jsp">登录</a></span>
						</div>
						<div class="sect">
							<s:action name="listCity" namespace="/" id="listCity"/>
							<s:form method="post" action="register" namespace="/" theme="simple" validate="true">

								<div class="field email">
									<label for="txtEmail">Email</label>
									<s:textfield id="txtEmail" name="user.email" cssClass="f-input"
												 required="true"/>
									<s:fielderror cssClass="field-error">
										<s:param>user.email</s:param>
									</s:fielderror>
									<span class="hint">用于登录及找回密码，不会公开，请放心填写</span>
								</div>
								<div class="field username">
									<label for="txtUsername">用户名</label>
									<s:textfield id="txtUsername" name="user.username" cssClass="f-input" maxlength="16"
												 required="true"/>
									<s:fielderror cssClass="field-error">
										<s:param>user.username</s:param>
									</s:fielderror>
									<span class="hint">填写4-16个字符，一个汉字为两个字符</span>
								</div>
								<div class="field password">
									<label for="txtPassword">密码</label>
									<s:password id="txtPassword" name="user.password" cssClass="f-input" maxlength="20"
												required="true"/>
									<s:fielderror cssClass="field-error">
										<s:param>user.password</s:param>
									</s:fielderror>
									<span class="hint">为了您的帐号安全，建议密码最少设置为6个字符以上</span>
								</div>
								<div class="field password">
									<label for="txtPasswordConfirm">确认密码</label>
									<s:password id="txtPasswordConfirm" name="user.passwordConfirm" cssClass="f-input"
												maxlength="20" required="true"/>
									<s:fielderror cssClass="field-error">
										<s:param>user.passwordConfirm</s:param>
									</s:fielderror>
									<span class="hint">必须输入相同的密码</span>
								</div>
								<div class="field">
									<label for="txtMobile">手机号码</label>
									<s:textfield id="txtMobile" name="user.mobile" cssClass="f-input"
												 maxlength="11" required="true"/>
									<s:fielderror cssClass="field-error">
										<s:param>user.mobile</s:param>
									</s:fielderror>
									<span class="hint">手机号码是我们联系您的重要方式，用于优惠券的短信通知</span>
								</div>
								<div class="field city">
									<label id="select-city">所在城市</label>
									<select class="tf-input" name="cityName">
										<s:iterator id="city" value="#listCity.cities">
											<option><s:property value="#city.chnName"/></option>
										</s:iterator>
									</select>
									<s:fielderror cssClass="field-error">
										<s:param>user.city</s:param>
									</s:fielderror>
									<span class="hint">根据您所在城市，我们将提供相应的团购信息</span>
								</div>
								<div class="field validationCode">
									<label>验证码</label>
									<s:textfield id="txtValidationCode" name="validation" cssClass="tf-input"
												 maxlength="4" required="true"/>
									<img id="validation_image" src="/validationCode"
										 onclick="this.src='/validationCode?a=' + Math.random()"/>
									<s:fielderror cssClass="field-error">
										<s:param>validation</s:param>
									</s:fielderror>
								</div>
								<div class="act">
									<s:submit value="同意以下协议并注册" name="commit" id="submit" cssClass="formbutton"/>
									<br>
								<a href="/page/about/term.jsp">《18团购用户协议》</a>
								</div>
							</s:form>
						</div>
					</div>
					<div class="box-bottom"></div>
				</div>
			</div>
			<div id="sidebar">
				<div class="sbox">
					<div class="sbox-top"></div>
					<div class="sbox-content">
						<div class="side-tip">
							<h2>已有18团购账户？</h2>

							<p>请直接<a href="/page/login.jsp">登录</a>。</p>
						</div>
					</div>
					<div class="sbox-bottom"></div>
				</div>
			</div>
		</div>
	</div>
</div>

<jsp:include page="../common/footer.jsp"/>
</body>
</html>